namespace OX.Strongbind
{
    using System;
    using System.Text;


    internal class NavigationPathHolder : MarshalByRefObject, IPropertyAccessNotifier
    {
        private Guid identity;
        private string navigationPath;

        public NavigationPathHolder()
        {
            navigationPath = null;
        }

        public void NotifyGetProperty(Guid identity, string property)
        {
            this.identity = identity;
            this.navigationPath = property;
        }

        public Guid GetIdentity()
        {
            return identity;
        }

        public string GetLastNavigationPath()
        {
            if (string.IsNullOrEmpty(navigationPath))
                return null;
            return navigationPath;
        }

        public void ClearNavigationPath()
        {
            navigationPath = null;
        }
    }
}
